package org.example.design.exerciseold.principle;

/**
 * @Auther: lingshi
 * @Date: 2020/5/8 09:56
 * @Description:
 */
public class JavaCourseSell implements CourseSell {
    private int id;
    private String name;
    private double price;

    public JavaCourseSell(int id, String name, double price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }


    @Override
    public int getId() {
        return this.id;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public double getPrice() {
        return this.price;
    }

    public double getdiscountsPrice(){
        return this.price*0.7;
    }
}
